/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.webos.java.explorer;

import java.util.ArrayList;
import java.util.List;
import org.webos.java.base.fs.FileDescriptor;
import org.webos.java.root.Log;

/**
 *
 * @author kostya
 */
public class TreeItem {
    private FileDescriptor file = null;
    private TreeItem parent = null;
    private List<TreeItem> children = new ArrayList<TreeItem>();
    private boolean collapsed = true;

    public TreeItem(FileDescriptor aFile, TreeItem aParent) {
        Log.debug(this, "New tree item", aFile, aParent);
        setFile(aFile);
        setParent(aParent);
    }

    public FileDescriptor getFile() {
        return file;
    }

    public void setFile(FileDescriptor file) {
        this.file = file;
    }

    public TreeItem getParent() {
        return parent;
    }

    public void setParent(TreeItem parent) {
        this.parent = parent;
    }

    public List<TreeItem> getChildren() {
        return children;
    }

    public boolean isCollapsed() {
        return collapsed;
    }

    public void setCollapsed(boolean collapsed) {
        this.collapsed = collapsed;
    }
}
